with GUI;
with GUI.Log;

with FFXILog_Interface;

with Win32API_Interface;
with win32api_interface.process; use win32api_interface.process;

procedure ffxialarm is
  pragma Linker_Options ("-mwindows");
  Main_Window : GUI.FFXIAlarm_Window_Type;
  Log_Window  : GUI.Log.Log_Window_Type;

  package Tasks is
    procedure Stop_Logger;
    procedure Start_Stop_Logger;
    procedure Play(Which : in Integer);

    package Logger_Routines is
      type Parameters is private;
      procedure Start (Process : in Process_ID;
                       par     : out Parameters;
                       success : out Boolean);
      procedure Work  (par     : in out Parameters;
                       success : out Boolean);
      procedure Finish(par     : in Parameters);
    private
      type Parameters is record
        Access_Handle : win32api_interface.Handle;
        Log_Info      : FFXILog_Interface.Log_Info_Type;
        Checked_Lines : Integer;
      end record;
    end Logger_Routines;
    package Alarm_Routines is
      procedure Play_and_Repeat;
    end Alarm_Routines;
  private
    task Logger is
      entry Start(Process : in Process_ID);
    end Logger;
    task Alarm is
      entry Start;
    end Alarm;
  end Tasks;
  package body Tasks is separate;

  package GUI_Events is
    procedure Do_Events;
  end GUI_Events;
  package body GUI_Events is separate;
begin
  GUI_Events.Do_Events;
end ffxialarm;
